#include<stdio.h>
int x[2000000];
void QuickSort(int low,int high)
{
    int a = low;
    int b = high;
    if(low < high)
    {
        int pivotkey;
        int m = low + (high - low)/2;
        if(x[low] > x[high])
        {
            int temp = x[high];
            x[high] = x[low];
            x[low] = temp;
        }
        if(x[m] > x[high])
        {
            int temp = x[high];
            x[high] = x[m];
            x[m] = temp;
        }
        if(x[low] < x[m])
        {
            int temp = x[m];
            x[m] = x[low];
            x[low] = temp;
        }
        pivotkey = x[low];
        while (low < high)
        {
            while(low < high && x[high] >= pivotkey) high--;
            x[low] = x[high];
            while (low < high && x[low] <= pivotkey) low++;
            x[high] = x[low];
        }
        //if(a == 1 && b == 2) printf("%d %d %d ",pivotkey,x[1],x[2]);
        x[low] = pivotkey;
        QuickSort(a,high-1);
        QuickSort(high+1,b);
    }
}
int main()
{
    //freopen("in.txt","r",stdin);
    int n;
    scanf("%d",&n);
    for(int i = 1; i <= n; i++)
    {
        scanf("%d",&x[i]);
    }

    QuickSort(1,n);
    for(int i = 1; i <= n; i++)
    {
        printf("%d ",x[i]);
    }
}